﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartSpace.Core
{
    /// <summary>
    /// 导航信息
    /// </summary>
    public class Navigation : ICodeEntity
    {
        public Guid Id { get; set; }
        public string Code { get; set; }

        public Guid SiteId { get; set; }
        public Guid? PageId { get; set; }
        public Guid? ImageId { get; set; }
        public Guid? ParentId { get; set; }
        public string Caption { get; set; }
        public string Description { get; set; }

        /// <summary>
        /// to view
        ///     v>>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}?arg1=1&arg2=2
        /// to application
        ///     a>>{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
        /// to other url
        ///     u>>http://www.example.com
        /// </summary>
        public string Url { get; set; }
        public string UrlType { get; set; }
        public string Arguments { get; set; }
        /// <summary>
        /// 导航对应到的视图会切换到对应的视图容器编号
        /// </summary>
        public string ContainerCode { get; set; }
        public int SortIndex { get; set; }

        public List<Navigation> Children { get; set; }


        public void Validation()
        {
        }
    }
}
